/**
 * @file name UnitsUtils.java
 */
package com.digital.community.common.utils;

import java.util.Date;

/**
 * 
 * @author yarine.gao
 * @date 2012-4-11
 * @version 1.0.0
 */
public class UnitsUtils {

	public static int pxToDip(int px, float scale) {
		return (int)(px / scale + 0.5f); 
	}
	
	public static int dipToPx(int dip, float scale) {
		return (int)(dip * scale + 0.5f);
	}
	
	//格式化时间
	public static String getTimeNumberString(){
		 java.text.DateFormat format = new java.text.SimpleDateFormat("yyMMddHHmmss");
	        String result = format.format(new Date());
	        return result;
	}
}
